# coding=utf-8
import os
from Config import config


def run():
    data_path = os.getcwd() + '\data'
    command = 'mongorestore -h {} --port {} -d {} --drop {}'.format(
        config.host,  # mongodb主机
        config.port,  # mongodb端口
        config.dbname,  # mongodb仓库
        data_path,  # 数据路径
    )
    os.system(command)


if __name__ == '__main__':
    run()
